\(\int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx\) [196]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [B] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 33, antiderivative size = 199 \[ \int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\frac {4 a^3 (A-B) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {20 a^3 (A+B) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {4 a^3 (A+4 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}-\frac {2 (A-B) \sqrt {\sec (c+d x)} \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{3 d} \]

[Out]

2/3*a*A*(a+a*sec(d*x+c))^2*sin(d*x+c)/d/sec(d*x+c)^(1/2)+4/3*a^3*(A+4*B)*sin(d*x+c)*sec(d*x+c)^(1/2)/d-2/3*(A-
B)*(a^3+a^3*sec(d*x+c))*sin(d*x+c)*sec(d*x+c)^(1/2)/d+4*a^3*(A-B)*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2
*c)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))*cos(d*x+c)^(1/2)*sec(d*x+c)^(1/2)/d+20/3*a^3*(A+B)*(cos(1/2*d*x+1/2*
c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))*cos(d*x+c)^(1/2)*sec(d*x+c)^(1/2)/d

Rubi [A] (verified)

Time = 0.60 (sec) , antiderivative size = 199, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {4102, 4103, 4082, 3872, 3856, 2719, 2720} \[ \int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\frac {4 a^3 (A+4 B) \sin (c+d x) \sqrt {\sec (c+d x)}}{3 d}-\frac {2 (A-B) \sin (c+d x) \sqrt {\sec (c+d x)} \left (a^3 \sec (c+d x)+a^3\right )}{3 d}+\frac {20 a^3 (A+B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )}{3 d}+\frac {4 a^3 (A-B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{d}+\frac {2 a A \sin (c+d x) (a \sec (c+d x)+a)^2}{3 d \sqrt {\sec (c+d x)}} \]

[In]

Int[((a + a*Sec[c + d*x])^3*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(3/2),x]

[Out]

(4*a^3*(A - B)*Sqrt[Cos[c + d*x]]*EllipticE[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/d + (20*a^3*(A + B)*Sqrt[Cos[c
 + d*x]]*EllipticF[(c + d*x)/2, 2]*Sqrt[Sec[c + d*x]])/(3*d) + (4*a^3*(A + 4*B)*Sqrt[Sec[c + d*x]]*Sin[c + d*x
])/(3*d) + (2*a*A*(a + a*Sec[c + d*x])^2*Sin[c + d*x])/(3*d*Sqrt[Sec[c + d*x]]) - (2*(A - B)*Sqrt[Sec[c + d*x]
]*(a^3 + a^3*Sec[c + d*x])*Sin[c + d*x])/(3*d)

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rule 3856

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 4082

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.
) + (A_)), x_Symbol] :> Simp[(-b)*B*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*(n + 1))), x] + Dist[1/(n + 1), Int[(d
*Csc[e + f*x])^n*Simp[A*a*(n + 1) + B*b*n + (A*b + B*a)*(n + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e,
 f, A, B}, x] && NeQ[A*b - a*B, 0] &&  !LeQ[n, -1]

Rule 4102

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[a*A*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*n)), x]
- Dist[b/(a*d*n), Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^(n + 1)*Simp[a*A*(m - n - 1) - b*B*n - (a*
B*n + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2
 - b^2, 0] && GtQ[m, 1/2] && LtQ[n, -1]

Rule 4103

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 1)*((d*Csc[e + f*x])^n/(f*(m +
n))), x] + Dist[1/(d*(m + n)), Int[(a + b*Csc[e + f*x])^(m - 1)*(d*Csc[e + f*x])^n*Simp[a*A*d*(m + n) + B*(b*d
*n) + (A*b*d*(m + n) + a*B*d*(2*m + n - 1))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] &&
NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && GtQ[m, 1/2] &&  !LtQ[n, -1]

Rubi steps \begin{align*} \text {integral}& = \frac {2 a A (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}+\frac {2}{3} \int \frac {(a+a \sec (c+d x))^2 \left (\frac {1}{2} a (7 A+3 B)-\frac {3}{2} a (A-B) \sec (c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx \\ & = \frac {2 a A (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}-\frac {2 (A-B) \sqrt {\sec (c+d x)} \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{3 d}+\frac {4}{9} \int \frac {(a+a \sec (c+d x)) \left (\frac {3}{2} a^2 (4 A+B)+\frac {3}{2} a^2 (A+4 B) \sec (c+d x)\right )}{\sqrt {\sec (c+d x)}} \, dx \\ & = \frac {4 a^3 (A+4 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}-\frac {2 (A-B) \sqrt {\sec (c+d x)} \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{3 d}+\frac {8}{9} \int \frac {\frac {9}{4} a^3 (A-B)+\frac {15}{4} a^3 (A+B) \sec (c+d x)}{\sqrt {\sec (c+d x)}} \, dx \\ & = \frac {4 a^3 (A+4 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}-\frac {2 (A-B) \sqrt {\sec (c+d x)} \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{3 d}+\left (2 a^3 (A-B)\right ) \int \frac {1}{\sqrt {\sec (c+d x)}} \, dx+\frac {1}{3} \left (10 a^3 (A+B)\right ) \int \sqrt {\sec (c+d x)} \, dx \\ & = \frac {4 a^3 (A+4 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}-\frac {2 (A-B) \sqrt {\sec (c+d x)} \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{3 d}+\left (2 a^3 (A-B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\cos (c+d x)} \, dx+\frac {1}{3} \left (10 a^3 (A+B) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx \\ & = \frac {4 a^3 (A-B) \sqrt {\cos (c+d x)} E\left (\left .\frac {1}{2} (c+d x)\right |2\right ) \sqrt {\sec (c+d x)}}{d}+\frac {20 a^3 (A+B) \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {\sec (c+d x)}}{3 d}+\frac {4 a^3 (A+4 B) \sqrt {\sec (c+d x)} \sin (c+d x)}{3 d}+\frac {2 a A (a+a \sec (c+d x))^2 \sin (c+d x)}{3 d \sqrt {\sec (c+d x)}}-\frac {2 (A-B) \sqrt {\sec (c+d x)} \left (a^3+a^3 \sec (c+d x)\right ) \sin (c+d x)}{3 d} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 2.89 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.02 \[ \int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\frac {a^3 e^{-i d x} \sec ^{\frac {3}{2}}(c+d x) (\cos (d x)+i \sin (d x)) \left (12 i A-12 i B+12 i A \cos (2 (c+d x))-12 i B \cos (2 (c+d x))+40 (A+B) \cos ^{\frac {3}{2}}(c+d x) \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )-4 i (A-B) \left (1+e^{2 i (c+d x)}\right )^{3/2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3}{4},\frac {7}{4},-e^{2 i (c+d x)}\right )+A \sin (c+d x)+4 B \sin (c+d x)+6 A \sin (2 (c+d x))+18 B \sin (2 (c+d x))+A \sin (3 (c+d x))\right )}{6 d} \]

[In]

Integrate[((a + a*Sec[c + d*x])^3*(A + B*Sec[c + d*x]))/Sec[c + d*x]^(3/2),x]

[Out]

(a^3*Sec[c + d*x]^(3/2)*(Cos[d*x] + I*Sin[d*x])*((12*I)*A - (12*I)*B + (12*I)*A*Cos[2*(c + d*x)] - (12*I)*B*Co
s[2*(c + d*x)] + 40*(A + B)*Cos[c + d*x]^(3/2)*EllipticF[(c + d*x)/2, 2] - (4*I)*(A - B)*(1 + E^((2*I)*(c + d*
x)))^(3/2)*Hypergeometric2F1[1/2, 3/4, 7/4, -E^((2*I)*(c + d*x))] + A*Sin[c + d*x] + 4*B*Sin[c + d*x] + 6*A*Si
n[2*(c + d*x)] + 18*B*Sin[2*(c + d*x)] + A*Sin[3*(c + d*x)]))/(6*d*E^(I*d*x))

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(653\) vs. \(2(229)=458\).

Time = 26.11 (sec) , antiderivative size = 654, normalized size of antiderivative = 3.29

method result size
default \(-\frac {4 a^{3} \left (-4 A \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+2 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (5 A +9 B \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (2 A +5 B \right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-2 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \left (5 A \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )-3 A \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+5 B \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+3 B \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right ) \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+5 A \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-3 A \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )+5 B \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticF}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right ) \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}+3 B \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \sqrt {\frac {1}{2}-\frac {\cos \left (d x +c \right )}{2}}\, \sqrt {2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1}\, \operatorname {EllipticE}\left (\cos \left (\frac {d x}{2}+\frac {c}{2}\right ), \sqrt {2}\right )\right )}{3 \sqrt {-2 \sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\sin \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}\, \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{\frac {3}{2}} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) d}\) \(654\)
parts \(\text {Expression too large to display}\) \(882\)

[In]

int((a+a*sec(d*x+c))^3*(A+B*sec(d*x+c))/sec(d*x+c)^(3/2),x,method=_RETURNVERBOSE)

[Out]

-4/3*a^3*(-4*A*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*cos(1/2*d*x+1/2*c)*sin(1/2*d*x+1/2*c)^6+2*
(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*(5*A+9*B)*sin(1/2*d*x+1/2*c)^4*cos(1/2*d*x+1/2*c)-2*(-2*s
in(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*A+5*B)*sin(1/2*d*x+1/2*c)^2*cos(1/2*d*x+1/2*c)-2*(-2*sin(1/
2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*(5*A*
EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))-3*A*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))+5*B*EllipticF(cos(1/2*d*x+1/2*
c),2^(1/2))+3*B*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2)))*sin(1/2*d*x+1/2*c)^2+5*A*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(
2*sin(1/2*d*x+1/2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2
*c)^2)^(1/2)-3*A*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*
d*x+1/2*c)^2-1)^(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2))+5*B*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/
2*c)^2-1)^(1/2)*EllipticF(cos(1/2*d*x+1/2*c),2^(1/2))*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)+3*B
*(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)*(sin(1/2*d*x+1/2*c)^2)^(1/2)*(2*sin(1/2*d*x+1/2*c)^2-1)^
(1/2)*EllipticE(cos(1/2*d*x+1/2*c),2^(1/2)))/(-2*sin(1/2*d*x+1/2*c)^4+sin(1/2*d*x+1/2*c)^2)^(1/2)/(2*cos(1/2*d
*x+1/2*c)^2-1)^(3/2)/sin(1/2*d*x+1/2*c)/d

Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.11 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.08 \[ \int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=-\frac {2 \, {\left (5 i \, \sqrt {2} {\left (A + B\right )} a^{3} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) - 5 i \, \sqrt {2} {\left (A + B\right )} a^{3} \cos \left (d x + c\right ) {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) - 3 i \, \sqrt {2} {\left (A - B\right )} a^{3} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 i \, \sqrt {2} {\left (A - B\right )} a^{3} \cos \left (d x + c\right ) {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) - \frac {{\left (A a^{3} \cos \left (d x + c\right )^{2} + 3 \, {\left (A + 3 \, B\right )} a^{3} \cos \left (d x + c\right ) + B a^{3}\right )} \sin \left (d x + c\right )}{\sqrt {\cos \left (d x + c\right )}}\right )}}{3 \, d \cos \left (d x + c\right )} \]

[In]

integrate((a+a*sec(d*x+c))^3*(A+B*sec(d*x+c))/sec(d*x+c)^(3/2),x, algorithm="fricas")

[Out]

-2/3*(5*I*sqrt(2)*(A + B)*a^3*cos(d*x + c)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) - 5*I*sqr
t(2)*(A + B)*a^3*cos(d*x + c)*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) - 3*I*sqrt(2)*(A - B)*
a^3*cos(d*x + c)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) + 3*I*sqrt(
2)*(A - B)*a^3*cos(d*x + c)*weierstrassZeta(-4, 0, weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)))
- (A*a^3*cos(d*x + c)^2 + 3*(A + 3*B)*a^3*cos(d*x + c) + B*a^3)*sin(d*x + c)/sqrt(cos(d*x + c)))/(d*cos(d*x +
c))

Sympy [F]

\[ \int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=a^{3} \left (\int \frac {A}{\sec ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx + \int \frac {3 A}{\sqrt {\sec {\left (c + d x \right )}}}\, dx + \int 3 A \sqrt {\sec {\left (c + d x \right )}}\, dx + \int A \sec ^{\frac {3}{2}}{\left (c + d x \right )}\, dx + \int \frac {B}{\sqrt {\sec {\left (c + d x \right )}}}\, dx + \int 3 B \sqrt {\sec {\left (c + d x \right )}}\, dx + \int 3 B \sec ^{\frac {3}{2}}{\left (c + d x \right )}\, dx + \int B \sec ^{\frac {5}{2}}{\left (c + d x \right )}\, dx\right ) \]

[In]

integrate((a+a*sec(d*x+c))**3*(A+B*sec(d*x+c))/sec(d*x+c)**(3/2),x)

[Out]

a**3*(Integral(A/sec(c + d*x)**(3/2), x) + Integral(3*A/sqrt(sec(c + d*x)), x) + Integral(3*A*sqrt(sec(c + d*x
)), x) + Integral(A*sec(c + d*x)**(3/2), x) + Integral(B/sqrt(sec(c + d*x)), x) + Integral(3*B*sqrt(sec(c + d*
x)), x) + Integral(3*B*sec(c + d*x)**(3/2), x) + Integral(B*sec(c + d*x)**(5/2), x))

Maxima [F]

\[ \int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{3}}{\sec \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]

[In]

integrate((a+a*sec(d*x+c))^3*(A+B*sec(d*x+c))/sec(d*x+c)^(3/2),x, algorithm="maxima")

[Out]

integrate((B*sec(d*x + c) + A)*(a*sec(d*x + c) + a)^3/sec(d*x + c)^(3/2), x)

Giac [F]

\[ \int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\int { \frac {{\left (B \sec \left (d x + c\right ) + A\right )} {\left (a \sec \left (d x + c\right ) + a\right )}^{3}}{\sec \left (d x + c\right )^{\frac {3}{2}}} \,d x } \]

[In]

integrate((a+a*sec(d*x+c))^3*(A+B*sec(d*x+c))/sec(d*x+c)^(3/2),x, algorithm="giac")

[Out]

integrate((B*sec(d*x + c) + A)*(a*sec(d*x + c) + a)^3/sec(d*x + c)^(3/2), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {(a+a \sec (c+d x))^3 (A+B \sec (c+d x))}{\sec ^{\frac {3}{2}}(c+d x)} \, dx=\int \frac {\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^3}{{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^{3/2}} \,d x \]

[In]

int(((A + B/cos(c + d*x))*(a + a/cos(c + d*x))^3)/(1/cos(c + d*x))^(3/2),x)

[Out]

int(((A + B/cos(c + d*x))*(a + a/cos(c + d*x))^3)/(1/cos(c + d*x))^(3/2), x)